package com.sun.stockexchangesimulate.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 存储每日的股票价格信息
 * @author sun
 * @TableName stock_price
 */
@TableName(value ="stock_price")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class StockPrice implements Serializable {
    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 股票代码
     */
    private String stockId;

    /**
     * 日期
     */
    private LocalDate date;

    /**
     * 开盘价
     */
    private BigDecimal openPrice;

    /**
     * 收盘价
     */
    private BigDecimal closePrice;

    /**
     * 最高价
     */
    private BigDecimal highPrice;

    /**
     * 最低价
     */
    private BigDecimal lowPrice;

    /**
     * 成交量
     */
    private Integer volume;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}